package com.mooc.fuxi.ui.comment;

import android.util.Log;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.mooc.fuxi.R;
import com.mooc.fuxi.entity.CommentEntity;

import org.jetbrains.annotations.NotNull;

public class CommentAdapter extends BaseQuickAdapter<CommentEntity, BaseViewHolder> {
    public CommentAdapter() {
        super(R.layout.item_comment);
        addChildClickViewIds(R.id.comment_like_btn);
    }

    @Override
     protected void convert(@NotNull BaseViewHolder baseViewHolder, CommentEntity commentEntity) {
        Log.e("ZXY","convert:"+commentEntity.title+commentEntity.flag);
        baseViewHolder.setText(R.id.comment_tv,
                   commentEntity.title);
           baseViewHolder.setText(R.id.comment_like_btn,
                   commentEntity.flag?"取消赞":"点赞");
    }
}
